<h3>User role</h3>

<table class="data">
    <tr class="data">
        <th class="data" width="30px">No</th>
        <th class="data">User Access</th>
        <th class="data" width="75px">Action</th>
    </tr>
    <tr class="data">
        <td class="data" width="30px"><?php echo $i ?></td>
        <td class="data">User</td>
        <td class="data" width="75px"><center>
            <a href="<?php echo base_url() ?>user_access/edit/1"><img src="<?php echo base_url() ?>img/edit1.png"></a>&nbsp;&nbsp;
    </center></td>
</tr>
<tr class="data">
    <td class="data" width="30px"><?php echo 2 ?></td>
    <td class="data">Admin</td>
    <td class="data" width="75px"><center>
    <a href="edit/2"><img src="<?php echo base_url() ?>img/edit1.png"></a>&nbsp;&nbsp;
</center></td>
</tr>
</table>

<h3>List user</h3>

<p>
    <?php echo anchor('users/register', 'Add'); ?>    

</p>

<table class="data">
    <tr class="data">
        <th class="data" width="30px">No</th>
        <th class="data">Name</th>
        <th class="data">Username</th>
        <th class="data">Access</th>
        <th class="data" width="75px">Action</th>
    </tr>
    <tr class="data">
        <?php foreach ($rows->result() as $user): ?>
            <td class="data" width="30px"><?php echo $i ?></td>
            <td class="data"><?php echo $user->name ?></td>
            <td class="data"><?php echo $user->username ?></td>
            <td class="data"><?php echo get_access($user->user_level) ?></td>
            <td class="data" width="75px">
        <center>
            <?php foreach ($access->result() as $a): ?>
                <?php echo get_edit($a->user_access_edit, 'users/edit/', $user->id) ?>
                <?php echo get_delete($a->user_access_delete, 'users/delete/', $user->id) ?>
            <?php endforeach ?>
        </center></td>
    </tr>
<?php endforeach ?>
</table>
